package com.shiro.receiver.framework.properties;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

@Data
@Validated
@ConfigurationProperties(prefix = "bot")
public class BotProperties {

    @NotNull(message = "yml文件配置项 bot.config 不能为空")
    private Config config;

    private Interceptors interceptors;

    @Data
    public static class Config {

        private Long uin;

        private String token;

        private String appId;

        @NotBlank(message = "yml文件配置项 bot.config.app-secret 不能为空")
        private String appSecret;

    }

    @Data
    public static class Interceptors {

        private Interceptor callbackVerificationInterceptor;

        private Interceptor signatureVerificationInterceptor;

    }

    @Data
    public static class Interceptor {

        private Boolean enabled;

    }

}
